package com.wtb.javatool.service;

import com.wtb.javatool.common.R;
import com.wtb.javatool.dto.AssignmentDto;
import com.wtb.javatool.dto.SubmissionDto;
import com.wtb.javatool.dto.TaskDto;
import com.wtb.javatool.entity.Attachment;
import com.wtb.javatool.entity.Project;
import com.wtb.javatool.entity.Task;
import com.wtb.javatool.vo.CourseTaskListCard;
import com.wtb.javatool.vo.TaskStatusMessage;
import org.apache.ibatis.annotations.Param;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

public interface TaskService {


    Long createTask(Task task);

    List<TaskDto> findTasksByProjectId(Long projectId, String taskName, Integer taskType, Long courseId, Long creatorId, Integer begin, Integer size);

    int countTasksByProjectId(Long projectId, String taskName, Integer taskType, Long courseId, Long creatorId);

    List<TaskDto> findMyTasksByProjectIdAndUserId(Long projectId, String taskName, Integer taskType, Long courseId, Long userId, Integer begin, Integer size);

    int countMyTasksByProjectIdAndUserId(Long projectId, String taskName, Integer taskType, Long courseId, Long userId);

    AssignmentDto findTaskAssignmentNumber(Long projectId,Integer evaluationType);

    TaskDto findTaskByTaskId(Long taskId,Integer projectType);

    void updateTaskName(Task task);

    void updateTaskDescription(Task task);

    void updateTaskType(Task task);

    void updateTaskCourse(Task task);

    List<SubmissionDto> findSubmissionAndAchievementByTasksId(List<Long> taskId,Integer projectType);
}
